'\" te
.\" Copyright (c) 1994, Sun Microsystems, Inc.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH BIOERROR 9F "April 9, 2016"
.SH NAME
bioerror \- indicate error in buffer header
.SH SYNOPSIS
.nf
#include <sys/types.h>
#include <sys/buf.h>
#include <sys/ddi.h>



\fBvoid\fR \fBbioerror\fR(\fBstruct buf *\fR\fIbp\fR, \fBint\fR \fIerror\fR);
.fi

.SH INTERFACE LEVEL
illumos DDI specific (illumos DDI)
.SH PARAMETERS
.ne 2
.na
\fB\fIbp\fR \fR
.ad
.RS 10n
Pointer to the \fBbuf\fR(9S) structure describing the transfer.
.RE

.sp
.ne 2
.na
\fB\fIerror\fR \fR
.ad
.RS 10n
Error number to be set, or zero to clear an error indication.
.RE

.SH DESCRIPTION
If \fIerror\fR is non-zero, \fBbioerror()\fR indicates an error has occurred in
the \fBbuf\fR(9S) structure. A subsequent call to \fBgeterror\fR(9F) will
return \fIerror\fR.
.sp
.LP
If \fIerror\fR is  \fB0\fR, the error indication is cleared and a subsequent
call to \fBgeterror\fR(9F) will return  \fB0\fR.
.SH CONTEXT
\fBbioerror()\fR can be called from any context.
.SH SEE ALSO
.BR strategy (9E),
.BR geterror (9F),
.BR getrbuf (9F),
.BR buf (9S)
